package com.dao.qsl;

import com.util.qsl.Dbutil;
import org.springframework.stereotype.Repository;

import java.sql.Connection;
import java.sql.PreparedStatement;

@Repository
public class ShanChuHdxx {
      public Boolean del(int hdxh){
	  Dbutil d=new Dbutil();
	  Connection c=null;

	  try {
	        c=d.getConnection();
	        String sql="DELETE  from community WHERE cid=?";
	        PreparedStatement pr=c.prepareStatement(sql);

	        pr.setInt(1,hdxh);

	        int i=pr.executeUpdate();

	        if(i>0){
		    return true;
	        }else {
		    return false;
	        }
	  }catch (Exception e){
	        e.printStackTrace();
	  }
	  return false;
      }
}
